<template>
	<view class="contxt-box">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script setup lang="ts">
	import {ref} from 'vue'
	import {
		getMerchantAgreement
	} from '@/common/request/api'
	import {
		onLoad
	} from '@dcloudio/uni-app'
	
	const content = ref('')
	onLoad(() => {
		getMerchantAgreement().then(res => {
			content.value = res.data.content.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ')
			uni.setNavigationBarTitle({
				title: res.data.remark
			})
		})
	})
</script>
<style>
	page {
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.contxt-box {
		padding: 30rpx;
	}
</style>